import check from '@dfeidao/atom-nodejs/authorization/check-right';
import { IFeidaoAiNodejsComponent } from '@dfeidao/atom-nodejs/interfaces';
import whoami from '@dfeidao/atom-nodejs/msg/whoami';
import render from '@dfeidao/atom-nodejs/render/render';
import get from '@dfeidao/atom-nodejs/storage/get';
import p002 from './p002';

export default async function na001(fd: IFeidaoAiNodejsComponent) {
	// todo
	const user = await whoami(fd.data.actionid, fd.data.sessionid);
	await check(fd, user.productid, '3', './login.html');
	const auth_code = get('auth_code');
	render(fd.data.node, auth_code, p002, 'p002');


}
